package order

import "github.com/shopspring/decimal"

/*
CREATE TABLE `order_cart` (

	`id` int(11) NOT NULL AUTO_INCREMENT,
	`sku_id` bigint(20) NOT NULL,
	`user_id` varchar(255) NOT NULL,
	`shop_id` int(11) NOT NULL,
	`goods_name` varchar(255) NOT NULL,
	`goods_num` int(11) NOT NULL,
	`goods_price` decimal(10,2) DEFAULT NULL,
	`status` tinyint(4) DEFAULT NULL,
	PRIMARY KEY (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf16;
*/
type Cart struct {
	Id         int
	SkuId      int64
	UserId     string
	ShopId     int
	GoodsName  string
	GoodsNum   int
	GoodsPrice decimal.Decimal `gorm:"type:decimal(10,2)"`
	GoodsImg   string
	Status     byte
}

func (*Cart) TableName() string {
	return "order_cart"
}
